function set(key, value) {
	if (!key) { 
		console.log("key不能空");
		return;
	}
	uni.setStorageSync(key, value);
}

function get(key) {
	if (!key) { 
		console.log("key不能空");
		return;
	}
	const res = uni.getStorageSync(key) || ''
	return res
}

function remove(key) {
	if (!key) { 
		console.log("key不能空");
		return;
	}
	uni.removeStorageSync(key);
}

function clear() {
	const list = uni.getStorageInfoSync().keys || [];
	for (let item of list) {    
		if (item !== 'domainname') {
			remove(item)
		}		
	}
}


export default {
  set,
  get,
  remove,
  clear
}
